Recovery Console commands

The following commands can be used with the Windows 2000 Recovery Console:

  • Attrib

    • Changes the attributes of a file or directory.

  • Batch

    • Executes the commands specified in the text file.

  • ChDir (Cd)

    • Displays the name of the current directory or changes the current directory.

  • Chkdsk

    • Checks a disk and displays a status report.

  • Cls

    • Clears the screen.

  • Copy

    • Copies a single file to another location.

  • Delete (Del)

    • Deletes one or more files.

  • Dir

    • Displays a list of files and subdirectories in a directory.

  • Disable

    • Disables a system service or a device driver.

  • Diskpart

    • Manages partitions on your hard drives.

  • Enable

    • Starts or enables a system service or a device driver.

  • Exit

    • Exits the Recovery Console and restarts your computer.

  • Expand

    • Extracts a file from a compressed file.

  • Fixboot

    • Writes a new partition boot sector onto the system partition.

  • Fixmbr

    • Repairs the master boot record of the partition boot sector.

  • Format

    • Formats a disk.

  • Help

    • Displays a list of the commands you can use in the Recovery Console.

  • Listsvc

    • Lists the services and drivers available on the computer.

  • Logon

    • Logs on to a Windows 2000 installation.

  • Map

    • Displays the drive letter mappings.

  • Mkdir (Md)

    • Creates a directory.

  • More

    • Displays a text file.

  • Rename (Ren)

    • Renames a single file.

  • Rmdir (Rd)

    • Deletes a directory.

  • Set

    • Displays and sets environment variables.

  • Systemroot

    • Sets the current directory to the systemroot directory of the system you are currently logged on to.

  • Type

    • Displays a text file.

Additional information on starting and using the Recovery Console is available. If you are using Windows 2000 Professional, see the Windows 2000 Professional Getting Started online book, or the Windows 2000 Professional Getting Started book that came with your Windows 2000 CD. If you are using Windows 2000 Server, see the Disaster Recovery How to section.

Related Topics


Set up a flash memory disk as a fail-safe startup device

To set up a flash memory disk as a fail-safe startup device

  1. Install the flash memory disk on your computer, if you haven't already done so. You must format the flash disk in Windows 2000, using NTFS as the file system.
  2. On the desktop, double-click My Computer.
  3. Copy the following files from the root directory of your hard disk to the flash disk: Boot.ini, Ntldr, and Ntdetect.com.
  4. Switch to the flash disk drive, right-click Boot.ini, and then click Properties.
  5. Clear the Read-only check box, and then click OK to close the Properties dialog box.
  6. In Notepad, open Boot.ini and edit it as follows:
    Replace all instances of rdisk(0) with rdisk(1).
    In addition, if your have a SCSI hard drive, replace all instances of scsi(0) with multi(0).
  7. Save and close Boot.ini.
  8. Change the file attribute for Boot.ini to Read-only again.
  9. Restart your computer.
  10. Insert the floppy disk that came with your flash memory disk into the disk drive.
  11. At the command prompt, type the following:

    dupdate /win:d000 /s:doc121.exb /first

  12. Remove the floppy disk from the disk drive and restart your computer.
  13. Install the Recovery Console. See Related Topics for information on installing the Recovery Console.

Notes

  • The operating system always starts from the flash memory disk, though most of the operating system files are stored on the hard disk. In the event of a startup failure, you can start the Recovery Console from the flash memory disk and attempt to repair your operating system.
  • This procedure is designed for the M-Systems DiskOnChip, using the latest firmware driver (version 1.21), but may be applied to other flash memory disks as well.


Recovery Console overview

The Windows 2000 Recovery Console is a command-line console that you can start from the Windows 2000 Setup program. Using the Recovery Console, you can start and stop services, format drives, read and write data on a local drive (including drives formatted to use NTFS), and perform many other administrative tasks. The Recovery Console is particularly useful if you need to repair your system by copying a file from a floppy disk or CD-ROM to your hard drive, or if you need to reconfigure a service that is preventing your computer from starting properly. Because the Recovery Console is quite powerful, it should only be used by advanced users who have a thorough knowledge of Windows 2000. In addition, you must be an administrator to use the Recovery Console.

There are two ways to start the Recovery Console:

  • If you are unable to start your computer, you can run the Recovery Console from your Windows 2000 Setup disks or from the Windows 2000 Professional CD (if you can start your computer from your CD-ROM drive).
  • As an alternative, you can install the Recovery Console on your computer to make it available in case you are unable to restart Windows 2000. You can then select the Recovery Console option from the list of available operating systems.

After you start the Recovery Console you will have to choose which drive you want to log on to (if you have a dual-boot or multiple-boot system) and you will have to log on with your administrator password.

For information on starting and using the Recovery Console, see Related Topics. In addition, if you are using Windows 2000 Professional, see the Windows 2000 Professional Getting Started online book, or the Windows 2000 Professional Getting Started book that came with your Windows 2000 CD. If you are using Windows 2000 Server, see the Disaster Recovery How to section.

Once you are running the Recovery Console, you can get help on the available commands by typing help at the command prompt.


Create an Emergency Repair Disk

To create an Emergency Repair Disk

  2. On the Tools menu, click Create an Emergency Repair Disk.
  3. Follow the instructions that appear on your screen.

Important

  • You will need a blank 1.44 MB floppy disk to create an Emergency Repair Disk (ERD).
  • The repair process relies on information that is saved in the systemroot\repair folder. You must not change or delete this folder.

Notes

  • Choosing Also back up the registry to the repair directory will save your current registry files in a folder within your systemroot/repair folder. This is useful if you need to recover your system in the event your hard disk has failed.
  • Additional information on the repair process is available. If you are using Windows 2000 Professional, see the Windows 2000 Professional Getting Started online book or the Windows 2000 Professional Getting Started book that came with your Windows 2000 CD. If you are using Windows 2000 Server, see the Disaster Recovery How to section.


Delete the Recovery Console

To delete the Recovery Console

  1. Restart your computer.
  2. Double-click My Computer, and then double-click the hard drive on which you installed the Recovery Console.
  3. On the Tools menu, click Folder Options.
  4. Click the View tab.
  5. Click Show hidden files and folders, clear the Hide protected operating system files check box, and then click OK.
  6. At the root directory, delete the \Cmdcons folder.
  7. At the root directory, delete the file Cmldr.
  8. At the root directory, right-click the Boot.ini file and then click Properties.
  9. Clear the Read-only check box, and then click OK.
  10. Open Boot.ini in Notepad, and remove the entry for the Recovery Console. It will look similar to this:

    C:\cmdcons\bootsect.dat="Microsoft Windows 2000 Recovery Console" /cmdcons

  11. Save the file and close it.

Warning

  • Modifying the Boot.ini file incorrectly may prevent your computer from restarting. Be sure to delete only the entry for the Recovery Console.

Notes

  • It is recommended that you change the attribute for the Boot.ini file back to read-only after you complete this procedure. You may also want to hide your system files again.


Use emergency repair on a system that will not start

To use emergency repair on a system that will not start

You can use the Windows 2000 emergency repair feature to fix problems that may be preventing you from starting your computer. This includes problems with your registry, system files, partition boot sector, and startup environment. However, you may not be able to use the emergency repair process to fix your system unless you have created an Emergency Repair Disk (ERD), which you can create using the Backup utility. If you haven't created an ERD, you can still attempt to use the emergency repair process to fix your computer, but the emergency repair process may not be able to fix your problems.

The following steps provide a general overview of the emergency repair process:

Start your computer from the Windows 2000 Setup disks or the CD

You can start your system using either the Windows 2000 Setup disks or the Windows 2000 CD. However, you can only use the CD to start your computer if your computer hardware and BIOS support this functionality.

Choose the repair option during setup

After your computer starts, the Setup program will start. During Setup you will be asked whether you want to continue installing the Windows 2000 operating system. You must press ENTER to continue. This will start the installation process, which allows you to repair your system. During this process you can choose whether you want to install a fresh version of Windows 2000, or whether you want to repair an existing installation of Windows 2000. To repair a damaged or corrupt system, you should press R. You will then be asked whether you want to repair your system using the Recovery Console or the emergency repair process. You should press R if you want to repair your system using the emergency repair process.

Choose the type of repair

You can choose either the fast repair option, which is the easiest and doesn't require any user interaction, or you can choose the manual repair option, which requires user interaction. The fast repair option will attempt to repair problems related to the registry, system files, the partition boot sector on your boot volume, and your startup environment (if you have a dual-boot or multiple-boot system). The manual repair option lets you choose whether you want to repair system files, partition boot sector problems, or startup environment problems, but it doesn't let you repair problems with your registry. For example, using the manual repair option, you can attempt to repair only your system files if you know your partition boot sector and your startup environment are both intact.

Notes

  • The manual repair option should only be used by advanced users or administrators.
  • The fast repair option will use a backup copy of the registry that was created when Setup was first run on your system. If you choose this option, you may lose settings or preferences you have created since Setup was first run.
  • If you want to manually repair individual registry files or replace your entire registry, you can use the Recovery Console. However, this is recommended for advanced users only.

Start the repair process

To start the repair process, you should have the 1.44 MB ERD that you created in the Backup utility, and the original Windows 2000 installation CD. If you do not have an ERD, the emergency repair process can attempt to locate your Windows 2000 installation and start repairing your system, but it may not be able to do so.

Note

  • If the emergency repair process can't fix your system, you can try using the Recovery Console or you can try reinstalling Windows 2000. See Related Topics for more information.

Restart your computer

If the emergency repair process was successful, your computer will automatically restart and you should have a working system.

Additional information on the repair process is available. If you are using Windows 2000 Professional, see the Windows 2000 Professional Getting Started online book or the Windows 2000 Professional Getting Started book that came with your Windows 2000 CD. If you are using Windows 2000 Server, see the Disaster Recovery How to section.

Important

  • The repair process relies on information that is saved in the systemroot\repair folder. You must not change or delete this folder.


Install the Recovery Console as a startup option

To install the Recovery Console as a startup option

  1. With Windows running, insert the Windows 2000 Professional CD into your CD-ROM drive.
  2. Click No when prompted to upgrade to Windows 2000.
  3. At the command prompt, switch to your CD-ROM drive, and then type the following:

    \i386\winnt32.exe /cmdcons

  4. Follow the instructions on the screen.

Notes

  • To run the Recovery Console, you must restart your computer and select the Recovery Console option from the list of available operating systems.
  • You must be logged on as an administrator or a member of the Administrators group in order to complete this procedure. If your computer is connected to a network, network policy settings may also prevent you from completing this procedure.
  • To see the commands available on the Recovery Console, type help at the command prompt.
  • You can allow a user to run the Recovery Console without logging on by enabling the Automatic administrative logon when using recovery console attribute in the Group Policy snap-in. This attribute is located in the console tree under Local Computer Policy/Computer Configuration/Windows Settings/Security Settings/Local Policies/Security Options.
  • If your computer will not start, you can run the Recovery Console from the Windows 2000 Professional CD (if you have a bootable CD-ROM drive) or the Setup disks. See Related Topics for information on running the Recovery Console when your computer will not start.


Repair overview

Windows 2000 has several features that allow you to repair a system that will not start or will not load Windows 2000. These features are useful if some of your system files become corrupted or are accidentally erased, or if you have installed software or device drivers that cause your system to not work properly.

Safe mode

Safe mode lets you start your system with a minimal set of device drivers and services. For example, if newly installed device drivers or software are preventing your computer from starting, you may be able to start you computer in safe mode and then remove the software or device drivers from your system. Safe mode will not work in all circumstances, especially if your system files are corrupted or missing or your hard disk is damaged or has failed. For information about the safe mode options, see Safe mode startup options.

Windows 2000 Recovery Console

The Recovery Console feature provides you with a command-line interface that will let you repair system problems using a limited set of command-line commands. For example, you could use the Recovery Console to enable and disable services, repair a corrupted master boot record, or copy system files from a floppy disk or a CD-ROM. This feature gives you maximum control over the repair process and should be used only by advanced users and administrators.

Emergency Repair Process

The Emergency Repair Disk (ERD) feature helps you repair problems with system files, your startup environment (if you have a dual-boot or multiple-boot system), and the partition boot sector on your boot volume. Before you use the Emergency Repair Disk feature to repair your system you must create an Emergency Repair Disk. You can do this using the Backup utility. Even if you have not created an Emergency Repair Disk you can still try to use the Emergency Repair Disk process; however, any changes you have made to your system, such as Service Pack updates, may be lost and may need to be reinstalled.

You can also reinstall Windows 2000 over a damaged Windows 2000 system. This may be time-consuming, but is useful if the emergency repair process does not solve your problem. If you reinstall your system you may lose changes that have been made to your system, such as Service Pack upgrades, and you will need to reinstall those upgrades.


Run the Recovery Console on a system that will not start

To run the Recovery Console on a system that will not start

  1. Insert the Windows 2000 Professional Setup Disk 1 (3.5-inch) into your disk drive or, if you have a bootable CD-ROM drive, insert the Windows 2000 Professional CD into your CD-ROM drive.
  2. Restart your computer.
  3. Follow the directions on the screen. If you are using the Setup disks, you will be prompted to insert the other Setup disks into the disk drive. It may take several minutes to load files. Choose the options to repair your Windows 2000 installation, and finally to start the Recovery Console.

Notes

  • You must be logged on as an administrator or a member of the Administrators group in order to complete this procedure. If your computer is connected to a network, network policy settings may also prevent you from completing this procedure.
  • To see the commands available on the Recovery Console, type help at the command prompt.
  • As an alternative, you can install the Recovery Console on your computer so it is always available. See Related Topics for information on installing the Recovery Console.